package club.zhilin.guli.service.trade.feign;

import club.zhilin.guli.common.base.result.CommonResult;
import club.zhilin.guli.service.base.dto.MemberDTO;
import club.zhilin.guli.service.trade.feign.fallback.IUserCenterMemberServiceImpl;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author zhilin
 * @since 2022/3/1 16:45
 */
@FeignClient(value = "service-ucenter")
@SentinelResource(fallbackClass = IUserCenterMemberServiceImpl.class)
public interface IUserCenterMemberService {
    /**
     * 根据memberId查询member对象
     *
     * @param memberId memberId
     * @return commonResult
     */
    @GetMapping("/portal/ucenter/member/inner/member/{memberId}")
    CommonResult<MemberDTO> selectMemberByMemberId(@PathVariable("memberId") String memberId);
}
